package com.yiduo.outpost.stream.sender;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Service;

@Service
public class KafkaProducer {

    @Autowired
    private KafkaTemplate<String, String> kafkaTemplate;
    /**
     * This method is used to send a message to the Kafka topic "report-data".
     * The message is sent with a key of "0".
     *
     * @param message The message to be sent to the Kafka topic.
     */
    public void sendMessage(String message) {
        kafkaTemplate.send("rds-report", "0", message);
    }
}